/**
 * @properties={typeid:35,uuid:"53B4B14B-C3AF-45F0-B723-732A02553A44",variableType:4}
 */
var fNro = null;

/**
 * @properties={typeid:35,uuid:"DCC79996-C70E-4FAC-BDAE-563EF75F635C",variableType:4}
 */
var fSucursal = 1;

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"4D6BE89C-31B9-4025-9E51-DA826DDFF9F7"}
 */
function buscar(event) {
	forms.opago_baja_adelanto_2.controller.find()
	
	forms.opago_baja_adelanto_2.sucursal = fSucursal
	forms.opago_baja_adelanto_2.letra = 'X'
	forms.opago_baja_adelanto_2.nro_comprobante = fNro
	forms.opago_baja_adelanto_2.codigo_movimiento=5   // solo adelantos, no OP=4  15/10/2010
	
	var f = forms.opago_baja_adelanto_2.controller.search()
	
	if (f==0)
		globals.gDialog('Error','No se encontro Adelanto a Fletero','OK','CerrarForm')
	else
		application.showFormInDialog(forms.opago_baja_adelanto_2,-1,-1,-1,-1,'Adelanto Nº' + fNro,true,false,'opago_baja_adelanto',true)
	
}
